package com.example.teachingSystem.pojo.form.score;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
@Schema(description = "新增成绩表")
public class AddScoreForm {

    @Schema(description = "选课ID")
    @NotBlank(message = "选课ID不能为空")
    private Long enrollmentId;

    @Schema(description = "学生ID")
    @NotBlank(message = "学生ID不能为空")
    private Long studentId;

    @Schema(description = "课程成绩")
    @NotBlank(message = "课程成绩不能为空")
    @DecimalMin(value = "0", message = "考试成绩不能小于0")
    @DecimalMax(value = "100", message = "平时成绩不能大于100")
    private BigDecimal grade;

    @Schema(description = "平时成绩")
    @NotBlank(message = "平时不能为空")
    @DecimalMin(value = "0", message = "平时成绩不能小于0")
    @DecimalMax(value = "100", message = "平时成绩不能大于100")
    private BigDecimal usualGrade;

    @Schema(description = "考试成绩")
    @NotBlank(message = "考试成绩不能为空")
    @DecimalMin(value = "0", message = "考试成绩不能小于0")
    @DecimalMax(value = "100", message = "平时成绩不能大于100")
    private BigDecimal examGrade;
}
